package com.aichongbang.acb.mapper;

import com.aichongbang.acb.po.Customer;
import com.aichongbang.acb.po.Item;
import com.aichongbang.acb.po.Pet;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author acb
 * @since 2021-05-27
 */
@Repository("CustomerMapper")
public interface CustomerMapper extends BaseMapper<Customer> {

    @ResultMap("getAll")
    List<Customer> getAll();

    @ResultMap("add")
    int add(Customer customer);

    @ResultMap("update")
    int update(Customer customer);

    @ResultMap("delete")
    int delete(Integer id);

    @ResultMap("getItemById")
    Customer getItemById(@Param("tId") Integer tId);
}
